{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=3123
  Verdict: Accepted
}
uses SysUtils, Math;
 
var
	kk,cc,ls,i:longint;
	s,t:string;
	a:array[0..1010] of longint;
	ch:char;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
readln(s);
fillchar(A,sizeof(a),0);
cc:=0;
kk:=pos('h',s);
while kk>0 do begin
	inc(cc);
	a[cc]:=kk;
	s[kk]:='$';
	kk:=pos('h',s);
end;
t:=copy(s,a[1],a[cc]-a[1]+1);
delete(s,a[1],a[cc]-a[1]+1);
ls:=length(t);
kk:=ls div 2;
for i:=1 to kk do begin
	ch:=t[i];
	t[i]:=t[ls+1-i];
	t[ls+1-i]:=ch;
end;
insert(t,s,a[1]);
kk:=pos('$',s);
while kk>0 do begin
	s[kk]:='h';
	kk:=pos('$',s);
end;
writeln(s);
end.